import javax.naming.InitialContext;
import javax.naming.NamingException;

import beans.UtilStatelessRemote;



public class Main {
	public static void main(String[] args) {

		InitialContext ctx = null;
		
		UtilStatelessRemote bean= null;
		try{
			ctx = new InitialContext();
			bean = (UtilStatelessRemote) ctx.lookup("java:global/NewJPAProprietatiEJBEAR/NewJPAProprietatiEJB/UtilStateless!beans.UtilStatelessRemote");
		}
		catch (NamingException e)
		{
			e.printStackTrace();
		}
		
		//bean.insertProperty("strada2");	
		//bean.insertCasa(50, 8, 8000, "strada2");	
		//bean.insertProperty("strada");
		//bean.insertCasa(20, 4, 3000, "strada");
		//bean.insertProperty("strada3");
		//bean.insertCasa(40, 3, 2000, "strada3");
		bean.insertTeren(200, 150, "strada4");
		bean.insertTeren(500, 350, "strada5");
		bean.insertTeren(300, 650, "strada6");
		
		bean.getTeren(300);
		//bean.showProprieties();
		
		
	}

	/* (non-Java-doc)
	 * @see java.lang.Object#Object()
	 */
	public Main() {
		super();
	}

}